package com.fowo.api.model.logistics.provider.item;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 物流商子表 导入导出辅助模型 */
@Getter
@Setter
public class LogisticsProviderItemExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属物流商")
  private String parentLogisticsProviderName;

  @ExcelIgnore
  @ExcelProperty(value = "所属物流商")
  private Long parentLogisticsProvider;

  @NotBlank(message = "自定义收款账号名称不能为空")
  @Size(max = 50, message = "自定义收款账号名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*自定义收款账号名称")
  private String name;

  @Size(max = 50, message = "swiftcode长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "swiftcode")
  private String swiftcode;

  @Size(max = 50, message = "账号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "账号")
  private String accountNumber;

  @EnumsString(
    value = { "是", "否" },
    message = "默认账号的可用值为 “是”, “否” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "默认账号")
  private String defaultAccount;
}
